#ifndef NANE_TESTFRAMEWORK_H
#   define  NANE_TESTFRAMEWORK_H

#   include "nane/lib/nane.h"
#   include "nane/SerializeSystem/SerializeSystem.h"
#   include "nane/core/conversion_stdstring.h"
#   include "nane/RenderSystem/RenderSystem.h"
#   include "nane/SoundSystem/SoundSystem.h"
#   include "nane/InputSystem/InputSystem.h"
#   include "nane/ScriptSystem/ScriptSystem.h"
#   include "nane/WindowSystem/WindowSystem.h"
#   include "nane/FileArchiveSystem/FileArchiveSystem.h"
#   include "nane/core/FileLogger.h"
#   include "nane/core/crt/Time.h"
#   include "nane/testframework/FileArchiveManager.h"
#   include "nane/testframework/ImageCodecManager.h"
#   include "nane/testframework/SoundCodecManager.h"
#   include <string>

namespace nane
{

    class TestFramework
        : public IWindowMessageHandler
    {
    public:
        TestFramework();
        ~TestFramework();

    public:
        bool Initialize( const char* _assetsDirectory, ILogger* _platformLogger = NULL );
        void Shutdown();
        int Run( const char* _commandLine );
        void Update();
        void ScriptSubscribeActionKey( const char* _action, int _key, float _scale );

    public:
        void OnClose();

    public:
        virtual void OnSetup();
        virtual void OnUpdate( uint32 _dt );
        virtual void OnRender();
        virtual void OnShutdown();

    protected:
        void ReadConfig( const char* _iniFilePath );

    protected:
        std::string m_windowTitle;
        uint32 m_windowWidth;
        uint32 m_windowHeight;
        bool m_running;
        uint32 m_frameTime;
        Window m_window;
        FileLogger m_fileLogger;
        FileArchive m_assets;
        SerializeSystem m_serializeSystem;
        InputSystem m_inputSystem;
        RenderSystem m_renderSystem;
        WindowSystem m_windowSystem;
        SoundSystem m_soundSystem;
        ScriptSystem m_scriptSystem;

    public:
        static TestFramework* CreateTest();
        static void ReleaseTest( TestFramework* _test );
    };

}   // namespace nane

#endif  // NANE_TESTFRAMEWORK_H
